package org.example.elm_springboot.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.example.elm_springboot.po.Food;
import org.example.elm_springboot.service.FoodService;
import java.util.List;

@RestController
@RequestMapping("/food")
public class FoodController {
    
    @Autowired
    private FoodService foodService;
    
    @RequestMapping("/listFoodByBusinessId")
    public List<Food> listFoodByBusinessId(Integer businessId){
        return foodService.listFoodByBusinessId(businessId);
    }
} 